<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
</head>

<body>
  <div id="app">

  </div>

</body>
<script>

  var data = ["北京", "天津", "上海"];
  var rs = ["<ul>"];
  $(data).each((index, item) => {
    rs.push('<li>' + item + '</li>')
  })
  rs.push('</ul>');

  $("#app").html(rs.join(' '));


</script>

</html>